package com.foreknow.demo11;

public class ExceptionDemo3 {
    public int sum(int a,int b) throws Exception {
        if(a < 0 || b < 0) {
            Exception e = new Exception();
            throw  e;
        }
        return a + b;
    }

    public static void main(String[] args) {
        ExceptionDemo3 demo3 = new ExceptionDemo3();
        try {
            demo3.sum(-12,-13);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("1111111111");
    }
}
